/***************************************************************
 *
 * (c) 2008 Markus Dittrich 
 *
 * This program is free software; you can redistribute it 
 * and/or modify it under the terms of the GNU General Public 
 * License Version 3 as published by the Free Software Foundation. 
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License Version 3 for more details.
 *
 * You should have received a copy of the GNU General Public 
 * License along with this program; if not, write to the Free 
 * Software Foundation, Inc., 59 Temple Place - Suite 330, 
 * Boston, MA 02111-1307, USA.
 *
 ****************************************************************/

#ifndef SETTINGS_WIDGET 
#define SETTINGS_WIDGET 

/* STL includes */

/* Qt includes */
#include <QWidget>

/* boost includes */
#include <boost/utility.hpp>

/* local includes */
#include "settings.h"


/* forward declarations */
class QCheckBox;
class QLabel;
class QGroupBox;


/****************************************************************
 *
 * the CanvasSelectionSensitivityWidget provides an interface
 * for adjusting the sensitivity when clicking on the canvas
 * to display the data pop-up info. 
 * At level 0, the user has to click exactly at the pixel
 * displaying the data point which may be difficult (1x1). 
 * By default the interface uses level 1, corresponding to x
 * 3x3 pixel area on which the user has to click. At level
 * 3, the area is 5x5.
 *
 ***************************************************************/
class SettingsWidget
  : 
    public QWidget,
    public boost::noncopyable
{

  Q_OBJECT

public:

  explicit SettingsWidget(Settings& settings, QWidget* parent = 0);
  bool Init();


private:  

  /* construction status of current instance */
  int status_;

  /* interface generators */
  void generate_sensitivity_grouper_();
  void generate_continuous_data_info_grouper_();

  /* member widgets */
  QGroupBox* sensitivityWidgetGrouper_;
  QCheckBox* continuousDataInfoSelector_;

  /* data members */
  Settings& settings_;

};

#endif
